<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>4</cardCount>
<cardID>2520</cardID>
<listID>4349</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on openStackglobal ChangedServingsput false into ChangedServingshide menubarend openStackon closeStackdoMenu "Compact Stack"end closeStackon FindObjectglobal Objectget the number of this cardput it into OrigCardput OrigCard into CurrentCardput OrigCard into PrevCardset lockscreen to trueput false into Donerepeat until Donego card CurrentCard+1find Objectget the number of this cardput it into CurrentCardif CurrentCard<=PrevCard thengo card OrigCardset lockscreen to falseput true into Doneelseset lockscreen to falserepeat until the mouseClickend repeatanswer "?" with "Stop here" or "Next recipe"if it="Stop here" thenput true into Doneelseput CurrentCard into PrevCardend ifset lockscreen to trueend ifend repeatend FindObjecton EditServingsglobal CurrentServingsglobal ServingsNeededget line 1 of field "Original Servings"put it into CurrentServingsask "How many servings do you need?" with CurrentServingsput it into ServingsNeededif ((ServingsNeeded≠"") and (ServingsNeeded≠CurrentServings)) then ChangeServingsend EditServingson ChangeServingsglobal ChangedServingsglobal CurrentServingsglobal ServingsNeededglobal Amountglobal Measureset cursor to busyset lockscreen to trueput true into ChangedServingsshow field "Amount"show field "Measure"show field "Servings"put ServingsNeeded into field "Servings"put ServingsNeeded/CurrentServings into ServingRatioput false into Doneput 1 into LineNumrepeat until Doneget line LineNum of field "Original Amount"if it≠"" thenput it*ServingRatio into Amountget line LineNum of field "Original Measure"put it into MeasureReduceMeasureput Amount into line LineNum of field "Amount"put Measure into line LineNum of field "Measure"put LineNum+1 into LineNumelseput true into Doneend ifend repeatset lockscreen to falseset cursor to pointerend ChangeServingson ReduceMeasureglobal Amountglobal Measureput false into Donerepeat until Doneput true into KnownMeasureif Measure="tsp" thenput 3 into Limitput "Tbsp" into NextMeasureelse if Measure="Tbsp" thenput 16 into Limitput "cup" into NextMeasureelse if ((Measure="cup") or (Measure="cups")) thenput 2 into Limitput "pint" into NextMeasureelse if ((Measure="pint") or (Measure="pints")) thenput 2 into Limitput "pint" into NextMeasureelse if ((Measure="quart") or (Measure="quarts")) thenput 4 into Limitput "gallon" into NextMeasureelse if ((Measure="ounce") or (Measure="ounces")) thenput 8 into Limitput "cup" into NextMeasureelse if Measure="dry oz" thenput 16 into Limitput "pound" into NextMeasureelseput false into KnownMeasureend ifif Amount>=Limit and KnownMeasure thenput Amount/Limit into Amountput Amount*100 into Amountput trunc(Amount) into Amountput Amount/100 into Amountput NextMeasure into Measureget the last char of Measureif ((it≠"s") and (Amount>1)) thenput Measure&"s" into Measureend ifelseput true into Doneend ifend repeatend ReduceMeasure</script>